<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="SceneObject3D,org.papervision3d.core.proto.SceneObject3D,materials,objects,addChild,removeChild" name="keywords">
<title>org.papervision3d.core.proto.SceneObject3D</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'SceneObject3D - Papervision3D 官方文档';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Papervision3D 官方文档</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">全部包</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">全部类</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">引索</a>&nbsp;|&nbsp;<a href="../../../../index.html?org/papervision3d/core/proto/SceneObject3D.html&amp;org/papervision3d/core/proto/class-list.html" id="framesLink1">框架</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">无框架</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">类&nbsp;SceneObject3D</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">属性</a>&nbsp;| <a href="#methodSummary">方法</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("类 SceneObject3D"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">包</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.papervision3d.core.proto</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">类</td><td class="classSignature">public class SceneObject3D</td>
</tr>
<tr>
<td class="classHeaderTableLabel">继承</td><td class="inheritanceList">SceneObject3D <img class="inheritArrow" alt="继承" title="继承" src="../../../../images/inherit-arrow.gif"> <a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a> <img class="inheritArrow" alt="继承" title="继承" src="../../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">子类</td><td><a href="../../scenes/Scene3D.html">Scene3D</a></td>
</tr>
</table>
<p></p>
 The SceneObject3D class is the base class for all scenes.
 <p/>场景对象3D类是所有场景的基础类
 A scene is the place where objects are placed, it contains the 3D environment.
 <p/>场景包含3d环境，是包含所有对象的
 The scene manages all objects rendered in Papervision3D. It extends the DisplayObjectContainer3D class to arrange the display objects.
 <p/>它管理所有在pv3d里渲染的对象。它扩展自DisplayObjectContainer3D类，用于安排显示对象
 SceneObject3D is an abstract base class; therefore, you cannot call SceneObject3D directly.
 <p>场景对象3d类是个抽象基本类，所以，你不能直接调用它。</p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">公共属性</div>
<div class="showHideLinks">
<div class="hideInheritedProperty" id="hideInheritedProperty">
<a onclick="javascript:setInheritedVisible(false,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> 隐藏继承的公共属性</a>
</div>
<div class="showInheritedProperty" id="showInheritedProperty">
<a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> 显示继承的公共属性</a>
</div>
</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">属性</th><th colspan="2">定义方</th>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="DisplayObjectContainer3D.html#children">children</a> : Object<div class="summaryTableDescription">
  <p>Returns the children object.</p>
  <p>返回子对象</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#materials">materials</a> : <a href="../../materials/utils/MaterialsList.html">MaterialsList</a>
<div class="summaryTableDescription">
  <p>It contains a list of materials in the scene.</p>
  <p>包含场景中材质的列表</p>
</div>
</td><td class="summaryTableOwnerCol">SceneObject3D</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="DisplayObjectContainer3D.html#numChildren">numChildren</a> : int<div class="summaryTableDescription">
  <p>Returns the number of children of this object.</p>
  <p>返回对象的子对象的数目</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#objects">objects</a> : Array<div class="summaryTableDescription">
  Contains a list of DisplayObject3D objects in the scene.包含场景中DisplayObject3D对象的列表</div></td><td class="summaryTableOwnerCol">SceneObject3D</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="DisplayObjectContainer3D.html#root">root</a> : <a href="../proto/DisplayObjectContainer3D.html">DisplayObjectContainer3D</a>
<div class="summaryTableDescription">
  <p>[只读] [只读] The scene, which is the top-most displayObjectContainer3D in the tree structure.</p>
  <p>树状结构中位于最顶层的displayObjectContainer3D对象即是场景</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">保护属性</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedProperty" id="hideInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(false,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> 隐藏继承的保护属性</a>
</div>
<div class="showInheritedProtectedProperty" id="showInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(true,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> 显示继承的保护属性</a>
</div>
</div>
<table id="summaryTableProtectedProperty" class="summaryTable hideInheritedProtectedProperty" cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">属性</th><th colspan="2">定义方</th>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="DisplayObjectContainer3D.html#_children">_children</a> : Dictionary<div class="summaryTableDescription">
  [包内使用] Names indexed by children.</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="DisplayObjectContainer3D.html#_childrenByName">_childrenByName</a> : Object<div class="summaryTableDescription">
  [包内使用] Children indexed by name.</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">公共方法</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> 隐藏继承的公共方法</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> 显示继承的公共方法</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">方法</th><th colspan="2">定义方</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#SceneObject3D()">SceneObject3D</a>()</div>
<div class="summaryTableDescription">
  <p>The SceneObject3D class lets you create scene classes.</p>
  <p>创建场景类</p>
</div>
</td><td class="summaryTableOwnerCol">SceneObject3D</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addChild()">addChild</a>(child:<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>, name:String = null):<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>
</div>
<div class="summaryTableDescription">
  <p>Adds a child DisplayObject3D instance to the scene..</p>
  <p>添加DisplayObject3D实例到场景中</p>
</div>
</td><td class="summaryTableOwnerCol">SceneObject3D</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="DisplayObjectContainer3D.html#addChildren()">addChildren</a>(parent:<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>):<a href="../proto/DisplayObjectContainer3D.html">DisplayObjectContainer3D</a>
</div>
<div class="summaryTableDescription">
  <p>Adds all the children of a DisplayObject3D instance to this DisplayObjectContainer instance.</p>
  <p>添加所有的DisplayObject3D的子对象到其中</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="DisplayObjectContainer3D.html#childrenList()">childrenList</a>():String</div>
<div class="summaryTableDescription">
  <p>Returns a string value with the list of objects.</p>
  <p>返回子对象的列表的字符串值</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="DisplayObjectContainer3D.html#getChildByName()">getChildByName</a>(name:String, recursive:Boolean = false):<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>
</div>
<div class="summaryTableDescription">
  <p>Returns the child display object that exists with the specified name.</p>
  <p>返回指定名称的子显示对象</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeChild()">removeChild</a>(child:<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>):<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>
</div>
<div class="summaryTableDescription">
  <p>Removes the specified child DisplayObject3D instance from the child and object list of the scene.</p>
  <p>从场景的子对象和对象列表中去除指定名称的子DisplayObject3D实例</p>
</div>
</td><td class="summaryTableOwnerCol">SceneObject3D</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="DisplayObjectContainer3D.html#removeChildByName()">removeChildByName</a>(name:String):<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>
</div>
<div class="summaryTableDescription">
  <p>Removes the child DisplayObject3D instance that exists with the specified name, from the child list of the DisplayObjectContainer3D instance.</p>
  <p>去除指定名称的DisplayObject3D实例，从DisplayObjectContainer3D对象的子列表中</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="DisplayObjectContainer3D.html#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
  <p>Returns a string value with the list of objects.</p>
  <p>返回对象列表的字符串值</p>
</div>
</td><td class="summaryTableOwnerCol"><a href="DisplayObjectContainer3D.html">DisplayObjectContainer3D</a></td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">属性详细信息</div>
<a name="materials"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">materials</td><td class="detailHeaderType">属性</td>
</tr>
</table>
<div class="detailBody">
<code>public var materials:<a href="../../materials/utils/MaterialsList.html">MaterialsList</a></code><p>
  It contains a list of materials in the scene.
  </p>
<p>包含场景中材质的列表</p>
<p>&nbsp;</p>
</div>
<a name="objects"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">objects</td><td class="detailHeaderType">属性</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var objects:Array</code><p>
  Contains a list of DisplayObject3D objects in the scene.
  </p>
<p>包含场景中DisplayObject3D对象的列表</p>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">构造函数详细信息</div>
<a name="SceneObject3D()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">SceneObject3D</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">构造函数</td>
</tr>
</table>
<div class="detailBody">
<code>public function SceneObject3D()</code><p>
  The SceneObject3D class lets you create scene classes.
    </p>
<p>创建场景类</p>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">方法详细信息</div>
<a name="addChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td>
</tr>
</table>
<div class="detailBody">
<code>public override function addChild(child:<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>, name:String = null):<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a></code><p>
  Adds a child DisplayObject3D instance to the scene.
    If you add a GeometryObject3D symbol, a new DisplayObject3D instance is created.
    [TODO: If you add a child object that already has a different display object container as a parent, the object is removed from the child list of the other display object container.]
    </p>
<p>为场景添加子DisplayObject3D对象，如果你添加一个GeometryObject3D元件，一个新的DisplayObject3D实例就被创建了【这么去做：如果你添加一个已经有父容器的子物体，那么这个子物体就会从以前的父容器中被删除掉】</p>
<span class="label">参数</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><p><code><span class="label">child</span>:<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a></code> &mdash; The GeometryObject3D symbol or DisplayObject3D instance to add as a child of the scene.
</p>
  <p>作为场景的子对象添加进来的GeometryObject3D元件或DisplayObject3D实例</p></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><p><code><span class="label">name</span>:String</code> (default = <code>null</code>)<code></code> &mdash; An optional name of the child to add or create. If no name is provided, the child name will be used.</p>
  <p>要添加或创建的子对象的自定义名称，如果此前没有设定名称，那么将用此名称。</p></td>
</tr>
</table>
<p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><p><code><a href="../../objects/DisplayObject3D.html">DisplayObject3D</a></code> &mdash; 
  The DisplayObject3D instance that you have added or created.</p>
  <p>要创建或添加的DisplayObject3D实例</p></td>
</tr>
</table>
</div>
<a name="removeChild()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeChild</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function removeChild(child:<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a>):<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a></code><p>
  Removes the specified child DisplayObject3D instance from the child and object list of the scene.
  </p>
<p>从场景的子对象和对象列表中去除指定名称的子DisplayObject3D对象</p>
  <p>[TODO: The parent property of the removed child is set to null, and the object is garbage collected if no other references to the child exist.]
  </p>
    The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.
    </p>
    </p>
  <p>【这么去做：要去除的子对象的父属性设定为null，如果没有对于此子对象的其他的引用，则此对象将被当做内存垃圾清理掉】内存清理器是FlashPlayer用于回收不使用的内存空间的进程，当一个变量或对象不再被引用或储存的时候，它所拥有的内存空间将被内存垃圾清理器回收。</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>
    </p>
    <span class="label">参数</span></p>
  <p>&nbsp; </p>
  <table border="0" cellspacing="0" cellpadding="0">
  <tr>
<td width="20px"></td><td><p><code><span class="label">child</span>:<a href="../../objects/DisplayObject3D.html">DisplayObject3D</a></code> &mdash; The DisplayObject3D instance to remove</p>
  <p>要去除的DisplayObject3D对象. </p></td>
</tr>
</table>
<p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><p><code><a href="../../objects/DisplayObject3D.html">DisplayObject3D</a></code> &mdash; 
  The DisplayObject3D instance that you pass in the child parameter.</p>
  <p>作为子参数的DisplayObject3D对象</p></td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">http://blog.papervision3d.org</center>
</div>
</body>
</html>
<!--http://blog.papervision3d.org-->
